<%--
  Created by IntelliJ IDEA.
  User: 郝大哥
  Date: 2021/11/19
  Time: 17:50
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>登录成功页面</title>
</head>
<body>
    <h1>欢迎${user.username}登录疫情管理系统</h1>
    <table border="1px" width="800px" style="text-align: center">
        <tr>
            <td>用户ID</td>
            <td>用户名</td>
            <td>密码</td>
            <td>状态码</td>
            <td>操作</td>
        </tr>
        <c:forEach items="${users}" var="u">
            <tr>
                <td>${u.id}</td>
                <td>${u.username}</td>
                <td>${u.password}</td>
                <td><a href="<%=request.getContextPath()%>/user/updateState?id=${u.id}&state=${u.state}">
                    <c:if test="${u.state==0}">
                        未激活
                    </c:if>
                    <c:if test="${u.state==1}">
                        激活
                    </c:if>
                </a></td>
                <td><a href="<%=request.getContextPath()%>/user/deleteById?id=${u.id}">删除</a></td>
            </tr>
        </c:forEach>
    </table>
</body>
</html>
